
<!--<pro-header [title]="'查询表格'"></pro-header>-->
<nz-card [nzBordered]="false">

        <div class="search-add-box">
            用户名称：<nz-input [nzType]="'search'" [nzPlaceHolder]="'请输入用户名称'" [(ngModel)]="_value" style="width: 200px;" (click)="seach()"></nz-input>
            <button nz-button (click)="add()" class="btn-right"  [nzType]="'primary'" [nzSize]="'large'">
                <i class="anticon anticon-plus"></i><span>新建</span>
            </button>
        </div>

    <div class="mb-md">

        <ng-container *ngIf="selectedRows.length > 0">
            <button nz-button [nzSize]="'large'">批量操作</button>
            <nz-dropdown [nzPlacement]="'bottomLeft'">
                <button nz-button nz-dropdown [nzSize]="'large'">
                    更多操作 <i class="anticon anticon-down"></i>
                </button>
                <ul nz-menu>
                    <li nz-menu-item (click)="remove()">删除</li>

                </ul>
            </nz-dropdown>
        </ng-container>
    </div>
    <div class="mb-md">
        <nz-alert [nzType]="'info'" [nzShowIcon]="true">
            <span alert-body>
                已选择 <strong class="text-primary">{{selectedRows.length}}</strong> 项&nbsp;&nbsp;
                <a *ngIf="totalCallNo > 0" (click)="clear()" class="ml-lg">清空</a>
            </span>
        </nz-alert>
    </div>
    <nz-table #nzTable [nzDataSource]="data" [nzPageSize]="q.ps" [nzLoading]="loading"
              (nzDataChange)="dataChange($event)"
              (nzPageIndexChange)="pageChange($event)">
        <thead nz-thead>
        <tr>
            <th nz-th [nzCheckbox]="true">
                <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate"
                       (ngModelChange)="checkAll($event)"></label>
            </th>
            <th nz-th><span>用户姓名</span></th>
            <th nz-th><span>用户账号</span></th>
            <th nz-th>
                <span>联系方式</span>
                <!--<nz-table-sort [(nzValue)]="sortMap.callNo" (nzValueChange)="sort('callNo',$event)"></nz-table-sort>-->
            </th>
            <th nz-th>
                <span>用户状态</span>
                <!--<nz-dropdown [nzTrigger]="'click'">-->
                    <!--<i class="anticon anticon-filter" nz-dropdown></i>-->
                    <!--<ul nz-menu>-->
                        <!--<li nz-menu-item *ngFor="let i of status">-->
                            <!--<label nz-checkbox [(ngModel)]="i.value"><span>{{i.text}}</span></label>-->
                        <!--</li>-->
                    <!--</ul>-->
                    <!--<div nz-table-filter>-->

                        <!--<span nz-table-filter-confirm (click)="getData()">确定</span>-->
                        <!--<span nz-table-filter-clear (click)="reset(status)">重置</span>-->
                    <!--</div>-->
                <!--</nz-dropdown>-->
            </th>
            <!--<th nz-th>-->
                <!--<span>说明</span>-->
                <!--<nz-table-sort [(nzValue)]="sortMap.updatedAt" (nzValueChange)="sort('updatedAt',$event)"></nz-table-sort>-->
            <!--</th>-->
            <th nz-th><span>操作</span></th>
        </tr>
        </thead>
        <tbody nz-tbody>
        <tr nz-tbody-tr *ngFor="let i of nzTable.data">
            <td nz-td [nzCheckbox]="true">
                <label nz-checkbox  [(ngModel)]="i.checked" (ngModelChange)="refreshStatus($event)">
                </label>
            </td>
            <td nz-td>{{i.UserName}}</td>
            <td nz-td>{{i.LoginName}}</td>
            <td nz-td>{{i.ContactWay}} </td>
            <td nz-td>

                <!--<nz-badge [nzStatus]="i.statusType" [nzText]="i.statusText"></nz-badge>-->
                {{i.type}}
            </td>

            <td nz-td>
                <a (click)="show(i)">查看</a>
                <span nz-table-divider></span>
                <a (click)="edit(i)">修改</a>
                <span nz-table-divider></span>
                <a (click)="del(i.id)">删除</a>
            </td>
        </tr>
        </tbody>
    </nz-table>
</nz-card>
<form nz-form [nzType]="'horizontal'" [formGroup]="validateForm">
<nz-modal  [nzWrapClassName]="'vertical-center-modal'" [nzVisible]="modalVisible" [nzTitle]="'新建用户'" [nzOkText]="'保存'" [nzCancelText]="'取消'" [nzConfirmLoading]="loading" [nzContent]="modalContent"
          (nzOnCancel)="modalVisible=false" (nzOnOk)="save()">
    <ng-template #modalContent >
        <div nz-form-item class="d-flex d-flex-margin">
            <label nz-form-item-required>用户名称</label>
            <div nz-form-control class="flex-1" nzHasFeedback  [nzValidateStatus]="getFormControl('U_name')">
                <nz-input [(ngModel)]="U_name" name="U_name"   formControlName="U_name"  [nzSize]="'large'" [nzPlaceHolder]="'请输入'" nzId="no"></nz-input>
                <div nz-form-explain *ngIf="getFormControl('U_name').dirty&&getFormControl('U_name').hasError('required')">用户名不能为空！</div>
            </div>
        </div>
        <div nz-form-item class="d-flex d-flex-margin">
            <label nz-form-item-required>用户账号</label>
            <div nz-form-control class="flex-1" nzHasFeedback  [nzValidateStatus]="getFormControl('LoginName')">
                <nz-input [(ngModel)]="LoginName" name="LoginName"   formControlName="LoginName"  [nzSize]="'large'" [nzPlaceHolder]="'请输入'" nzId="no"></nz-input>
                <div nz-form-explain *ngIf="getFormControl('LoginName').dirty&&getFormControl('LoginName').hasError('required')">用户账号不能为空！</div>
            </div>
        </div>
        <div nz-form-item class="d-flex d-flex-margin">
            <label nz-form-item-required>用户密码</label>
            <div nz-form-control class="flex-1" nzHasFeedback  [nzValidateStatus]="getFormControl('U_pwd')">
                <nz-input [(ngModel)]="U_pwd" name="U_pwd"     formControlName="U_pwd"   [nzType]="'password'"  [nzSize]="'large'" [nzPlaceHolder]="'请输入'" nzId="no"></nz-input>
                <div nz-form-explain *ngIf="getFormControl('U_pwd').dirty&&getFormControl('U_pwd').hasError('required')">密码不能为空！</div>
            </div>
        </div>

        <div nz-form-item nz-row class="d-flex d-flex-margin">
            <label nz-form-item-required>联系方式</label>
            <div nz-form-control class="flex-1" nzHasFeedback  [nzValidateStatus]="getFormControl('U_email')">
                <nz-input [(ngModel)]="U_email" name="U_email" formControlName="U_email"   [nzSize]="'large'" [nzPlaceHolder]="'请输入'"  [nzId]="'no'"></nz-input>
                <div nz-form-explain *ngIf="getFormControl('U_email').dirty&&getFormControl('U_email').hasError('required')">联系方式不能为空！</div>
            </div>
        </div>
        <div nz-form-item class="d-flex d-flex-margin">
            <label nz-form-item-required>用户类型</label>
            <div nz-form-control nz-col [nzSm]="20" [nzValidateStatus]="getFormControl('radioValue')">
                <nz-radio-group [(ngModel)]="radioValue" formControlName="radioValue" >
                    <label nz-radio [nzValue]="'2'" [nzDisabled]=yxflag>
                        <span>院校管理员</span>
                    </label>
                    <label nz-radio [nzValue]="'0'"  [nzDisabled]=yxflag>
                        <span>项目设计员</span>
                    </label>
                    <label nz-radio [nzValue]="'1'" [nzDisabled]=jsflag>
                        <span>教师</span>
                    </label>
                </nz-radio-group>
                <div nz-form-explain *ngIf="getFormControl('radioValue').dirty&&getFormControl('radioValue').hasError('required')">请选择用户类型！ </div>
            </div>
        </div>



    </ng-template>

</nz-modal>

</form>
